/*
 * @Author: your name
 * @Date: 2021-06-05 14:39:36
 * @LastEditTime: 2021-06-05 18:15:22
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \HW5\inc\exp2.hpp
 */
#if !defined(EXP2HPP)
#define EXP2HPP 

#include "common.hpp"
using namespace std ;

class Course;
class Student;
void testEXP2();
class Student
{
private:
	string name;
	int id;
	vector<Course *> courseList;  // 使用地址，防止析构之后课程仍然存在。

public:
	Student(string inputName, int inputId);
	~Student();
	void selectCourse(Course *A);
	int getCreditIntotal();
	string getName();
	int getId();
};

class Course
{
private:
    static vector<string> courseList;
	static int courseId;
    int _courseId;
	string name;
	int weight;
	vector<Student *> studentList;
    bool isOverWrited(string inputName);

public:
    int getId() const;
    static void init(); // 初始化id
	Course(string inputName, int inputWeight);
	~Course();
	void beSelected(Student *A);
	void printStudentlist();
	int getCredit() { return weight; }
};



#endif // EXP2HPP
